#!/usr/bin/env python
"""
# -*- coding: utf-8 -*-
# @Time    : 2020/10/14 13:48
# @Author  : AshJo
# @Desc    : gevent模块
# @Filename: gevent_demo.py
# @Version : v1.0
"""
import gevent


def func():
    print('start time')
    gevent.sleep(1)
    print('end time')


if __name__ == '__main__':
    g1 = gevent.spawn(func)
    g2 = gevent.spawn(func)
    g3 = gevent.spawn(func)
    gevent.joinall([g1, g2, g3])
